package com.chz.SupermarketMS.service;

//import com.chz.SupermarketMS.dao.UserAccountMapper;
import com.chz.SupermarketMS.dao.UserAccountRepository;
import com.chz.SupermarketMS.entities.UserAccount;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserAccountService {
    @Autowired
    UserAccountRepository userAccountRepository;

//    @Autowired
//    UserAccountMapper userAccountMapper;

    public UserAccount save(UserAccount userAccount) {
        return userAccountRepository.save(userAccount);
    }

//    public UserAccount findByUserAccountId(long theId) {
//        return userAccountRepository.findByUserAccountId(theId);
//    }
//
//    public void delete(UserAccount theUserAccount) {
//        userAccountRepository.delete(theUserAccount);
//    }

//    public UserAccount LoginIn(String userName, String password) {
//        return userAccountMapper.getInfo(userName,password);
//    }
//
//    public void Insert(String userName, String password) {
//        userAccountMapper.saveInfo(userName,password);
//    }
}
